package com.util;

import org.springframework.web.multipart.MultipartFile;

import java.io.File;

public class FileUtilLocal {

    /**
     * 获取文件的MD5加密密文
     */
    public static String getFileMD5(File file) {
        String fileMD5 = "";
        try {
            fileMD5 = MD5Util.getFileMD5(file);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return fileMD5;
    }

    public static String getMultiFileMD5(MultipartFile file) {
        String fileMD5 = "";
        try {
            fileMD5 = MD5Util.getMultiFileMD5(file);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return fileMD5;
    }

}
